package com.ateam.biz.impl;

import com.ateam.biz.NoticesBiz;
import com.ateam.dao.NoticesDao;
import com.ateam.pojo.Notices;

/** 
* @author WuYuan
* 
*/
public class NoticesBizImpl implements NoticesBiz {
	private NoticesDao noticesDao;
	
	
	public NoticesDao getNoticesDao() {
		return noticesDao;
	}


	public void setNoticesDao(NoticesDao noticesDao) {
		this.noticesDao = noticesDao;
	}


	@Override
	public Notices getNewNotice(int companyid) {
		try {
			return noticesDao.getNotice(companyid);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}


	@Override
	public int addNotice(Notices notice) {
		try {
			return noticesDao.addNotice(notice);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return 0;
	}

}
